package com.ruoyi.consume.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.consume.mapper.GraftinglabelConsumeTemporaryMapper;
import com.ruoyi.consume.domain.GraftinglabelConsumeTemporary;
import com.ruoyi.consume.service.IGraftinglabelConsumeTemporaryService;

/**
 * 查看临时领用信息Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-27
 */
@Service
public class GraftinglabelConsumeTemporaryServiceImpl implements IGraftinglabelConsumeTemporaryService
{
    @Autowired
    private GraftinglabelConsumeTemporaryMapper graftinglabelConsumeTemporaryMapper;

    /**
     * 查询查看临时领用信息
     *
     * @param graftinglabelConsumeTemporaryId 查看临时领用信息ID
     * @return 查看临时领用信息
     */
    @Override
    public GraftinglabelConsumeTemporary selectGraftinglabelConsumeTemporaryById(Long graftinglabelConsumeTemporaryId)
    {
        return graftinglabelConsumeTemporaryMapper.selectGraftinglabelConsumeTemporaryById(graftinglabelConsumeTemporaryId);
    }

    /**
     * 查询查看临时领用信息列表
     *
     * @param graftinglabelConsumeTemporary 查看临时领用信息
     * @return 查看临时领用信息
     */
    @Override
    public List<GraftinglabelConsumeTemporary> selectGraftinglabelConsumeTemporaryList(GraftinglabelConsumeTemporary graftinglabelConsumeTemporary)
    {
        return graftinglabelConsumeTemporaryMapper.selectGraftinglabelConsumeTemporaryList(graftinglabelConsumeTemporary);
    }

    /**
     * 新增查看临时领用信息
     *
     * @param graftinglabelConsumeTemporary 查看临时领用信息
     * @return 结果
     */
    @Override
    public int insertGraftinglabelConsumeTemporary(GraftinglabelConsumeTemporary graftinglabelConsumeTemporary)
    {
        graftinglabelConsumeTemporary.setCreateTime(DateUtils.getNowDate());
        return graftinglabelConsumeTemporaryMapper.insertGraftinglabelConsumeTemporary(graftinglabelConsumeTemporary);
    }

    /**
     * 修改查看临时领用信息
     *
     * @param graftinglabelConsumeTemporary 查看临时领用信息
     * @return 结果
     */
    @Override
    public int updateGraftinglabelConsumeTemporary(GraftinglabelConsumeTemporary graftinglabelConsumeTemporary)
    {
        graftinglabelConsumeTemporary.setUpdateTime(DateUtils.getNowDate());
        return graftinglabelConsumeTemporaryMapper.updateGraftinglabelConsumeTemporary(graftinglabelConsumeTemporary);
    }

    /**
     * 批量删除查看临时领用信息
     *
     * @param graftinglabelConsumeTemporaryIds 需要删除的查看临时领用信息ID
     * @return 结果
     */
    @Override
    public int deleteGraftinglabelConsumeTemporaryByIds(Long[] graftinglabelConsumeTemporaryIds)
    {
        return graftinglabelConsumeTemporaryMapper.deleteGraftinglabelConsumeTemporaryByIds(graftinglabelConsumeTemporaryIds);
    }

    /**
     * 删除查看临时领用信息信息
     *
     * @param graftinglabelConsumeTemporaryId 查看临时领用信息ID
     * @return 结果
     */
    @Override
    public int deleteGraftinglabelConsumeTemporaryById(Long graftinglabelConsumeTemporaryId)
    {
        return graftinglabelConsumeTemporaryMapper.deleteGraftinglabelConsumeTemporaryById(graftinglabelConsumeTemporaryId);
    }

    /**
     * 获取用户下拉框
     *
     * @param
     * @return 结果
     */
    @Override
    public List<GraftinglabelConsumeTemporary> getUserName(){
        return graftinglabelConsumeTemporaryMapper.getUserName();
    }
}
